home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / MacPNG Library 1.02 / pngMacSrc 1.02 / MacPNGlibs / zconf.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-24  |  2.6 KB  |  103 lines  |  [TEXT/CWIE]

  1. /* zconf.h -- configuration of the zlib compression library
  2.  * Copyright (C) 1995 Jean-loup Gailly.
  3.  * For conditions of distribution and use, see copyright notice in zlib.h 
  4.  */
  5.  
  6. /* $Id: zconf.h,v 1.12 1995/05/03 17:27:12 jloup Exp $ */
  7.  
  8. #ifndef _ZCONF_H
  9. #define _ZCONF_H
  10.  
  11. /*
  12.      The library does not install any signal handler. It is recommended to
  13.   add at least a handler for SIGSEGV when decompressing; the library checks
  14.   the consistency of the input data whenever possible but may go nuts
  15.   for some forms of corrupted input.
  16.  */
  17.  
  18. /*
  19.  * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
  20.  * than 64k bytes at a time (needed on systems with 16-bit int).
  21.  */
  22. #if defined(applec) || defined(__MWERKS__) || defined(THINK_C)        /* RMF Added */
  23. #define MACOS
  24. #define STDC
  25. #endif
  26. #if defined(_GNUC__) && !defined(__32BIT__)
  27. #  define __32BIT__
  28. #endif
  29. #if defined(__MSDOS__) && !defined(MSDOS)
  30. #  define MSDOS
  31. #endif
  32. #if defined(MSDOS) && !defined(__32BIT__)
  33. #  define MAXSEG_64K
  34. #endif
  35. #ifndef STDC
  36. #  if defined(MSDOS) || defined(__STDC__) || defined(__cplusplus)
  37. #    define STDC
  38. #  endif
  39. #endif
  40.  
  41. #if !defined(MACOS)    /* RMF */
  42. #if !defined(STDC) && !defined(const)
  43. #  define const
  44. #endif
  45. #endif    /* RMF */
  46.  
  47. /* Maximum value for memLevel in deflateInit2 */
  48. #ifndef MAX_MEM_LEVEL
  49. #  ifdef MAXSEG_64K
  50. #    define MAX_MEM_LEVEL 8
  51. #  else
  52. #    define MAX_MEM_LEVEL 9
  53. #  endif
  54. #endif
  55.  
  56. /* Maximum value for windowBits in deflateInit2 and inflateInit2 */
  57. #ifndef MAX_WBITS
  58. #  define MAX_WBITS   15 /* 32K LZ77 window */
  59. #endif
  60.  
  61. /* The memory requirements for deflate are (in bytes):
  62.             1 << (windowBits+2)   +  1 << (memLevel+9)
  63.  that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
  64.  plus a few kilobytes for small objects. For example, if you want to reduce
  65.  the default memory requirements from 256K to 128K, compile with
  66.      make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
  67.  Of course this will generally degrade compression (there's no free lunch).
  68.  
  69.    The memory requirements for inflate are (in bytes) 1 << windowBits
  70.  that is, 32K for windowBits=15 (default value) plus a few kilobytes
  71.  for small objects.
  72. */
  73.  
  74.                         /* Type declarations */
  75.  
  76. #ifndef __P /* function prototypes */
  77. #  ifdef STDC
  78. #    define __P(args)  args
  79. #  else
  80. #    define __P(args)  ()
  81. #  endif
  82. #endif
  83.  
  84. #ifndef Byte
  85.   typedef unsigned char  Byte;  /* 8 bits */
  86. #endif
  87. #ifndef uInt
  88.   typedef unsigned int   uInt;  /* 16 bits or more */
  89. #endif
  90. #ifndef uLong
  91.   typedef unsigned long  uLong; /* 32 bits or more */
  92. #endif
  93. #ifndef voidp
  94. #  ifdef STDC
  95.      typedef void *voidp;
  96. #  else
  97.      typedef Byte *voidp;
  98. #  endif
  99. #endif
  100.  
  101. #endif /* _ZCONF_H */
  102.  
  103.